<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html xmlns:yui="http://yuilibrary.com/rdf/1.0/yui.rdf#">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	<title>API: logger   Logger.js  (YUI Library)</title>

	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css" />
	<link rel="stylesheet" type="text/css" href="assets/api.css" />

    <script type="text/javascript" src="assets/api-js"></script>
    <script type="text/javascript" src="assets/ac-js"></script>
</head>

<body id="yahoo-com">

<div id="doc3" class="yui-t2">
	<div id="hd">
        <h1><a href="http://developer.yahoo.com/yui/" title="Yahoo! UI Library">Yahoo! UI Library</a></h1>
        <h3>Logger Widget&nbsp; <span class="subtitle">2.7.0</span></h3>
        <a href="./index.html" title="Yahoo! UI Library">Yahoo! UI Library</a> 
            &gt; <a href="./module_logger.html" title="logger">logger</a>
                
                 &gt; Logger.js (source view) 
        <form onsubmit="return false">
            <div id="propertysearch">
                Search: <input autocomplete="off" id="searchinput" />
                <div id="searchresults">
                    &nbsp;
                </div>
            </div>
        </form>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">
            <form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
                <fieldset>
                    <legend>Filters</legend>
                <span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
                <span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
                <span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
                </fieldset>
            </form>

                    <div id="srcout">
                        <style>
                            #doc3 .classopts { display:none; }
                        </style>
<div class="highlight" ><pre> <span class="c">/**</span>
<span class="c"> * The Logger widget provides a simple way to read or write log messages in</span>
<span class="c"> * JavaScript code. Integration with the YUI Library&#39;s debug builds allow</span>
<span class="c"> * implementers to access under-the-hood events, errors, and debugging messages.</span>
<span class="c"> * Output may be read through a LogReader console and/or output to a browser</span>
<span class="c"> * console.</span>
<span class="c"> *</span>
<span class="c"> * @module logger</span>
<span class="c"> * @requires yahoo, event, dom</span>
<span class="c"> * @optional dragdrop</span>
<span class="c"> * @namespace YAHOO.widget</span>
<span class="c"> * @title Logger Widget</span>
<span class="c"> */</span>

<span class="c">/****************************************************************************/</span>
<span class="c">/****************************************************************************/</span>
<span class="c">/****************************************************************************/</span>

<span class="c">// Define once</span>
<span class="c"></span><span class="k">if</span><span class="o">(!</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">)</span> <span class="o">{</span>
    <span class="c">/**</span>
<span class="c">     * The singleton Logger class provides core log management functionality. Saves</span>
<span class="c">     * logs written through the global YAHOO.log function or written by a LogWriter</span>
<span class="c">     * instance. Provides access to logs for reading by a LogReader instance or</span>
<span class="c">     * native browser console such as the Firebug extension to Firefox or Safari&#39;s</span>
<span class="c">     * JavaScript console through integration with the console.log() method.</span>
<span class="c">     *</span>
<span class="c">     * @class Logger</span>
<span class="c">     * @static</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span> <span class="o">=</span> <span class="o">{</span>
        <span class="c">// Initialize properties</span>
<span class="c"></span>        <span class="nx">loggerEnabled</span><span class="o">:</span> <span class="kc">true</span><span class="o">,</span>
        <span class="nx">_browserConsoleEnabled</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span>
        <span class="nx">categories</span><span class="o">:</span> <span class="o">[</span><span class="s2">&quot;info&quot;</span><span class="o">,</span><span class="s2">&quot;warn&quot;</span><span class="o">,</span><span class="s2">&quot;error&quot;</span><span class="o">,</span><span class="s2">&quot;time&quot;</span><span class="o">,</span><span class="s2">&quot;window&quot;</span><span class="o">],</span>
        <span class="nx">sources</span><span class="o">:</span> <span class="o">[</span><span class="s2">&quot;global&quot;</span><span class="o">],</span>
        <span class="nx">_stack</span><span class="o">:</span> <span class="o">[],</span> <span class="c">// holds all log msgs</span>
<span class="c"></span>        <span class="nx">maxStackEntries</span><span class="o">:</span> <span class="m">2500</span><span class="o">,</span>
        <span class="nx">_startTime</span><span class="o">:</span> <span class="k">new</span> <span class="nb">Date</span><span class="o">().</span><span class="nx">getTime</span><span class="o">(),</span> <span class="c">// static start timestamp</span>
<span class="c"></span>        <span class="nx">_lastTime</span><span class="o">:</span> <span class="kc">null</span><span class="o">,</span> <span class="c">// timestamp of last logged message</span>
<span class="c"></span>        <span class="nx">_windowErrorsHandled</span><span class="o">:</span> <span class="kc">false</span><span class="o">,</span>
        <span class="nx">_origOnWindowError</span><span class="o">:</span> <span class="kc">null</span>
    <span class="o">};</span>

    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Public properties</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">/**</span>
<span class="c">     * True if Logger is enabled, false otherwise.</span>
<span class="c">     *</span>
<span class="c">     * @property loggerEnabled</span>
<span class="c">     * @type Boolean</span>
<span class="c">     * @static</span>
<span class="c">     * @default true</span>
<span class="c">     */</span>

    <span class="c">/**</span>
<span class="c">     * Array of categories.</span>
<span class="c">     *</span>
<span class="c">     * @property categories</span>
<span class="c">     * @type String[]</span>
<span class="c">     * @static</span>
<span class="c">     * @default [&quot;info&quot;,&quot;warn&quot;,&quot;error&quot;,&quot;time&quot;,&quot;window&quot;]</span>
<span class="c">     */</span>

    <span class="c">/**</span>
<span class="c">     * Array of sources.</span>
<span class="c">     *</span>
<span class="c">     * @property sources</span>
<span class="c">     * @type String[]</span>
<span class="c">     * @static</span>
<span class="c">     * @default [&quot;global&quot;]</span>
<span class="c">     */</span>

    <span class="c">/**</span>
<span class="c">     * Upper limit on size of internal stack.</span>
<span class="c">     *</span>
<span class="c">     * @property maxStackEntries</span>
<span class="c">     * @type Number</span>
<span class="c">     * @static</span>
<span class="c">     * @default 2500</span>
<span class="c">     */</span>

    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Private properties</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">/**</span>
<span class="c">     * Internal property to track whether output to browser console is enabled.</span>
<span class="c">     *</span>
<span class="c">     * @property _browserConsoleEnabled</span>
<span class="c">     * @type Boolean</span>
<span class="c">     * @static</span>
<span class="c">     * @default false</span>
<span class="c">     * @private</span>
<span class="c">     */</span>

    <span class="c">/**</span>
<span class="c">     * Array to hold all log messages.</span>
<span class="c">     *</span>
<span class="c">     * @property _stack</span>
<span class="c">     * @type Array</span>
<span class="c">     * @static</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="c">/**</span>
<span class="c">     * Static timestamp of Logger initialization.</span>
<span class="c">     *</span>
<span class="c">     * @property _startTime</span>
<span class="c">     * @type Date</span>
<span class="c">     * @static</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="c">/**</span>
<span class="c">     * Timestamp of last logged message.</span>
<span class="c">     *</span>
<span class="c">     * @property _lastTime</span>
<span class="c">     * @type Date</span>
<span class="c">     * @static</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Public methods</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">/**</span>
<span class="c">     * Saves a log message to the stack and fires newLogEvent. If the log message is</span>
<span class="c">     * assigned to an unknown category, creates a new category. If the log message is</span>
<span class="c">     * from an unknown source, creates a new source.  If browser console is enabled,</span>
<span class="c">     * outputs the log message to browser console.</span>
<span class="c">     *</span>
<span class="c">     * @method log</span>
<span class="c">     * @param sMsg {String} The log message.</span>
<span class="c">     * @param sCategory {String} Category of log message, or null.</span>
<span class="c">     * @param sSource {String} Source of LogWriter, or null if global.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">log</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sMsg</span><span class="o">,</span> <span class="nx">sCategory</span><span class="o">,</span> <span class="nx">sSource</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">loggerEnabled</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">if</span><span class="o">(!</span><span class="nx">sCategory</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">sCategory</span> <span class="o">=</span> <span class="s2">&quot;info&quot;</span><span class="o">;</span> <span class="c">// default category</span>
<span class="c"></span>            <span class="o">}</span>
            <span class="k">else</span> <span class="o">{</span>
                <span class="nx">sCategory</span> <span class="o">=</span> <span class="nx">sCategory</span><span class="o">.</span><span class="nx">toLocaleLowerCase</span><span class="o">();</span>
                <span class="k">if</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_isNewCategory</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">))</span> <span class="o">{</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">_createNewCategory</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">);</span>
                <span class="o">}</span>
            <span class="o">}</span>
            <span class="k">var</span> <span class="nx">sClass</span> <span class="o">=</span> <span class="s2">&quot;global&quot;</span><span class="o">;</span> <span class="c">// default source</span>
<span class="c"></span>            <span class="k">var</span> <span class="nx">sDetail</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
            <span class="k">if</span><span class="o">(</span><span class="nx">sSource</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">var</span> <span class="nx">spaceIndex</span> <span class="o">=</span> <span class="nx">sSource</span><span class="o">.</span><span class="nx">indexOf</span><span class="o">(</span><span class="s2">&quot; &quot;</span><span class="o">);</span>
                <span class="k">if</span><span class="o">(</span><span class="nx">spaceIndex</span> <span class="o">&gt;</span> <span class="m">0</span><span class="o">)</span> <span class="o">{</span>
                    <span class="c">// Substring until first space</span>
<span class="c"></span>                    <span class="nx">sClass</span> <span class="o">=</span> <span class="nx">sSource</span><span class="o">.</span><span class="nx">substring</span><span class="o">(</span><span class="m">0</span><span class="o">,</span><span class="nx">spaceIndex</span><span class="o">);</span>
                    <span class="c">// The rest of the source</span>
<span class="c"></span>                    <span class="nx">sDetail</span> <span class="o">=</span> <span class="nx">sSource</span><span class="o">.</span><span class="nx">substring</span><span class="o">(</span><span class="nx">spaceIndex</span><span class="o">,</span><span class="nx">sSource</span><span class="o">.</span><span class="nx">length</span><span class="o">);</span>
                <span class="o">}</span>
                <span class="k">else</span> <span class="o">{</span>
                    <span class="nx">sClass</span> <span class="o">=</span> <span class="nx">sSource</span><span class="o">;</span>
                <span class="o">}</span>
                <span class="k">if</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_isNewSource</span><span class="o">(</span><span class="nx">sClass</span><span class="o">))</span> <span class="o">{</span>
                    <span class="k">this</span><span class="o">.</span><span class="nx">_createNewSource</span><span class="o">(</span><span class="nx">sClass</span><span class="o">);</span>
                <span class="o">}</span>
            <span class="o">}</span>

            <span class="k">var</span> <span class="nx">timestamp</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="o">();</span>
            <span class="k">var</span> <span class="nx">logEntry</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">LogMsg</span><span class="o">({</span>
                <span class="nx">msg</span><span class="o">:</span> <span class="nx">sMsg</span><span class="o">,</span>
                <span class="nx">time</span><span class="o">:</span> <span class="nx">timestamp</span><span class="o">,</span>
                <span class="nx">category</span><span class="o">:</span> <span class="nx">sCategory</span><span class="o">,</span>
                <span class="nx">source</span><span class="o">:</span> <span class="nx">sClass</span><span class="o">,</span>
                <span class="nx">sourceDetail</span><span class="o">:</span> <span class="nx">sDetail</span>
            <span class="o">});</span>

            <span class="k">var</span> <span class="nx">stack</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">_stack</span><span class="o">;</span>
            <span class="k">var</span> <span class="nx">maxStackEntries</span> <span class="o">=</span> <span class="k">this</span><span class="o">.</span><span class="nx">maxStackEntries</span><span class="o">;</span>
            <span class="k">if</span><span class="o">(</span><span class="nx">maxStackEntries</span> <span class="o">&amp;&amp;</span> <span class="o">!</span><span class="nb">isNaN</span><span class="o">(</span><span class="nx">maxStackEntries</span><span class="o">)</span> <span class="o">&amp;&amp;</span>
                <span class="o">(</span><span class="nx">stack</span><span class="o">.</span><span class="nx">length</span> <span class="o">&gt;=</span> <span class="nx">maxStackEntries</span><span class="o">))</span> <span class="o">{</span>
                <span class="nx">stack</span><span class="o">.</span><span class="nx">shift</span><span class="o">();</span>
            <span class="o">}</span>
            <span class="nx">stack</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">logEntry</span><span class="o">);</span>
            <span class="k">this</span><span class="o">.</span><span class="nx">newLogEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">(</span><span class="nx">logEntry</span><span class="o">);</span>

            <span class="k">if</span><span class="o">(</span><span class="k">this</span><span class="o">.</span><span class="nx">_browserConsoleEnabled</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">this</span><span class="o">.</span><span class="nx">_printToBrowserConsole</span><span class="o">(</span><span class="nx">logEntry</span><span class="o">);</span>
            <span class="o">}</span>
            <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>
            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Resets internal stack and startTime, enables Logger, and fires logResetEvent.</span>
<span class="c">     *</span>
<span class="c">     * @method reset</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">reset</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_stack</span> <span class="o">=</span> <span class="o">[];</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_startTime</span> <span class="o">=</span> <span class="k">new</span> <span class="nb">Date</span><span class="o">().</span><span class="nx">getTime</span><span class="o">();</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">loggerEnabled</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger reset&quot;</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">logResetEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">();</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Public accessor to internal stack of log message objects.</span>
<span class="c">     *</span>
<span class="c">     * @method getStack</span>
<span class="c">     * @return {Object[]} Array of log message objects.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">getStack</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="nx">_stack</span><span class="o">;</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Public accessor to internal start time.</span>
<span class="c">     *</span>
<span class="c">     * @method getStartTime</span>
<span class="c">     * @return {Date} Internal date of when Logger singleton was initialized.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">getStartTime</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">return</span> <span class="k">this</span><span class="o">.</span><span class="nx">_startTime</span><span class="o">;</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Disables output to the browser&#39;s global console.log() function, which is used</span>
<span class="c">     * by the Firebug extension to Firefox as well as Safari.</span>
<span class="c">     *</span>
<span class="c">     * @method disableBrowserConsole</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">disableBrowserConsole</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger output to the function console.log() has been disabled.&quot;</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_browserConsoleEnabled</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Enables output to the browser&#39;s global console.log() function, which is used</span>
<span class="c">     * by the Firebug extension to Firefox as well as Safari.</span>
<span class="c">     *</span>
<span class="c">     * @method enableBrowserConsole</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">enableBrowserConsole</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">_browserConsoleEnabled</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
        <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger output to the function console.log() has been enabled.&quot;</span><span class="o">);</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Surpresses native JavaScript errors and outputs to console. By default,</span>
<span class="c">     * Logger does not handle JavaScript window error events.</span>
<span class="c">     * NB: Not all browsers support the window.onerror event.</span>
<span class="c">     *</span>
<span class="c">     * @method handleWindowErrors</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">handleWindowErrors</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">if</span><span class="o">(!</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_windowErrorsHandled</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Save any previously defined handler to call</span>
<span class="c"></span>            <span class="k">if</span><span class="o">(</span><span class="nb">window</span><span class="o">.</span><span class="nx">error</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span> <span class="o">=</span> <span class="nb">window</span><span class="o">.</span><span class="nx">onerror</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="nb">window</span><span class="o">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_onWindowError</span><span class="o">;</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_windowErrorsHandled</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger handling of window.onerror has been enabled.&quot;</span><span class="o">);</span>
        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger handling of window.onerror had already been enabled.&quot;</span><span class="o">);</span>
        <span class="o">}</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Unsurpresses native JavaScript errors. By default,</span>
<span class="c">     * Logger does not handle JavaScript window error events.</span>
<span class="c">     * NB: Not all browsers support the window.onerror event.</span>
<span class="c">     *</span>
<span class="c">     * @method unhandleWindowErrors</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">unhandleWindowErrors</span> <span class="o">=</span> <span class="k">function</span><span class="o">()</span> <span class="o">{</span>
        <span class="k">if</span><span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_windowErrorsHandled</span><span class="o">)</span> <span class="o">{</span>
            <span class="c">// Revert to any previously defined handler to call</span>
<span class="c"></span>            <span class="k">if</span><span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span><span class="o">)</span> <span class="o">{</span>
                <span class="nb">window</span><span class="o">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span><span class="o">;</span>
                <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="k">else</span> <span class="o">{</span>
                <span class="nb">window</span><span class="o">.</span><span class="nx">onerror</span> <span class="o">=</span> <span class="kc">null</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_windowErrorsHandled</span> <span class="o">=</span> <span class="kc">false</span><span class="o">;</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger handling of window.onerror has been disabled.&quot;</span><span class="o">);</span>
        <span class="o">}</span>
        <span class="k">else</span> <span class="o">{</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger handling of window.onerror had already been disabled.&quot;</span><span class="o">);</span>
        <span class="o">}</span>
    <span class="o">};</span>
    
    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Public events</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>
     <span class="c">/**</span>
<span class="c">     * Fired when a new category has been created.</span>
<span class="c">     *</span>
<span class="c">     * @event categoryCreateEvent</span>
<span class="c">     * @param sCategory {String} Category name.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">categoryCreateEvent</span> <span class="o">=</span>
        <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">CustomEvent</span><span class="o">(</span><span class="s2">&quot;categoryCreate&quot;</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

     <span class="c">/**</span>
<span class="c">     * Fired when a new source has been named.</span>
<span class="c">     *</span>
<span class="c">     * @event sourceCreateEvent</span>
<span class="c">     * @param sSource {String} Source name.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">sourceCreateEvent</span> <span class="o">=</span>
        <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">CustomEvent</span><span class="o">(</span><span class="s2">&quot;sourceCreate&quot;</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

     <span class="c">/**</span>
<span class="c">     * Fired when a new log message has been created.</span>
<span class="c">     *</span>
<span class="c">     * @event newLogEvent</span>
<span class="c">     * @param sMsg {String} Log message.</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">newLogEvent</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">CustomEvent</span><span class="o">(</span><span class="s2">&quot;newLog&quot;</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

    <span class="c">/**</span>
<span class="c">     * Fired when the Logger has been reset has been created.</span>
<span class="c">     *</span>
<span class="c">     * @event logResetEvent</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">logResetEvent</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">CustomEvent</span><span class="o">(</span><span class="s2">&quot;logReset&quot;</span><span class="o">,</span> <span class="k">this</span><span class="o">,</span> <span class="kc">true</span><span class="o">);</span>

    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Private methods</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>
    <span class="c">/**</span>
<span class="c">     * Creates a new category of log messages and fires categoryCreateEvent.</span>
<span class="c">     *</span>
<span class="c">     * @method _createNewCategory</span>
<span class="c">     * @param sCategory {String} Category name.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_createNewCategory</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">categories</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">categoryCreateEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">);</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Checks to see if a category has already been created.</span>
<span class="c">     *</span>
<span class="c">     * @method _isNewCategory</span>
<span class="c">     * @param sCategory {String} Category name.</span>
<span class="c">     * @return {Boolean} Returns true if category is unknown, else returns false.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_isNewCategory</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sCategory</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">for</span><span class="o">(</span><span class="k">var</span> <span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span> <span class="o">&lt;</span> <span class="k">this</span><span class="o">.</span><span class="nx">categories</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">++)</span> <span class="o">{</span>
            <span class="k">if</span><span class="o">(</span><span class="nx">sCategory</span> <span class="o">==</span> <span class="k">this</span><span class="o">.</span><span class="nx">categories</span><span class="o">[</span><span class="nx">i</span><span class="o">])</span> <span class="o">{</span>
                <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">}</span>
        <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Creates a new source of log messages and fires sourceCreateEvent.</span>
<span class="c">     *</span>
<span class="c">     * @method _createNewSource</span>
<span class="c">     * @param sSource {String} Source name.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_createNewSource</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sSource</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">sources</span><span class="o">.</span><span class="nx">push</span><span class="o">(</span><span class="nx">sSource</span><span class="o">);</span>
        <span class="k">this</span><span class="o">.</span><span class="nx">sourceCreateEvent</span><span class="o">.</span><span class="nx">fire</span><span class="o">(</span><span class="nx">sSource</span><span class="o">);</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Checks to see if a source already exists.</span>
<span class="c">     *</span>
<span class="c">     * @method _isNewSource</span>
<span class="c">     * @param sSource {String} Source name.</span>
<span class="c">     * @return {Boolean} Returns true if source is unknown, else returns false.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_isNewSource</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sSource</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span><span class="o">(</span><span class="nx">sSource</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">for</span><span class="o">(</span><span class="k">var</span> <span class="nx">i</span><span class="o">=</span><span class="m">0</span><span class="o">;</span> <span class="nx">i</span> <span class="o">&lt;</span> <span class="k">this</span><span class="o">.</span><span class="nx">sources</span><span class="o">.</span><span class="nx">length</span><span class="o">;</span> <span class="nx">i</span><span class="o">++)</span> <span class="o">{</span>
                <span class="k">if</span><span class="o">(</span><span class="nx">sSource</span> <span class="o">==</span> <span class="k">this</span><span class="o">.</span><span class="nx">sources</span><span class="o">[</span><span class="nx">i</span><span class="o">])</span> <span class="o">{</span>
                    <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
                <span class="o">}</span>
            <span class="o">}</span>
            <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">};</span>

    <span class="c">/**</span>
<span class="c">     * Outputs a log message to global console.log() function.</span>
<span class="c">     *</span>
<span class="c">     * @method _printToBrowserConsole</span>
<span class="c">     * @param oEntry {Object} Log entry object.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_printToBrowserConsole</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">oEntry</span><span class="o">)</span> <span class="o">{</span>
        <span class="k">if</span><span class="o">(</span><span class="nb">window</span><span class="o">.</span><span class="nx">console</span> <span class="o">&amp;&amp;</span> <span class="nx">console</span><span class="o">.</span><span class="nx">log</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">var</span> <span class="nx">category</span> <span class="o">=</span> <span class="nx">oEntry</span><span class="o">.</span><span class="nx">category</span><span class="o">;</span>
            <span class="k">var</span> <span class="k">label</span> <span class="o">=</span> <span class="nx">oEntry</span><span class="o">.</span><span class="nx">category</span><span class="o">.</span><span class="nx">substring</span><span class="o">(</span><span class="m">0</span><span class="o">,</span><span class="m">4</span><span class="o">).</span><span class="nx">toUpperCase</span><span class="o">();</span>

            <span class="k">var</span> <span class="nx">time</span> <span class="o">=</span> <span class="nx">oEntry</span><span class="o">.</span><span class="nx">time</span><span class="o">;</span>
            <span class="k">var</span> <span class="nx">localTime</span><span class="o">;</span>
            <span class="k">if</span> <span class="o">(</span><span class="nx">time</span><span class="o">.</span><span class="nx">toLocaleTimeString</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">localTime</span>  <span class="o">=</span> <span class="nx">time</span><span class="o">.</span><span class="nx">toLocaleTimeString</span><span class="o">();</span>
            <span class="o">}</span>
            <span class="k">else</span> <span class="o">{</span>
                <span class="nx">localTime</span> <span class="o">=</span> <span class="nx">time</span><span class="o">.</span><span class="nx">toString</span><span class="o">();</span>
            <span class="o">}</span>

            <span class="k">var</span> <span class="nx">msecs</span> <span class="o">=</span> <span class="nx">time</span><span class="o">.</span><span class="nx">getTime</span><span class="o">();</span>
            <span class="k">var</span> <span class="nx">elapsedTime</span> <span class="o">=</span> <span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_lastTime</span><span class="o">)</span> <span class="o">?</span>
                <span class="o">(</span><span class="nx">msecs</span> <span class="o">-</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_lastTime</span><span class="o">)</span> <span class="o">:</span> <span class="m">0</span><span class="o">;</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_lastTime</span> <span class="o">=</span> <span class="nx">msecs</span><span class="o">;</span>

            <span class="k">var</span> <span class="nx">output</span> <span class="o">=</span>
                <span class="nx">localTime</span> <span class="o">+</span> <span class="s2">&quot; (&quot;</span> <span class="o">+</span>
                <span class="nx">elapsedTime</span> <span class="o">+</span> <span class="s2">&quot;ms): &quot;</span> <span class="o">+</span>
                <span class="nx">oEntry</span><span class="o">.</span><span class="nx">source</span> <span class="o">+</span> <span class="s2">&quot;: &quot;</span><span class="o">;</span>

            <span class="c">// for bug 1987607</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">env</span><span class="o">.</span><span class="nx">ua</span><span class="o">.</span><span class="nx">webkit</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">output</span> <span class="o">+=</span> <span class="nx">oEntry</span><span class="o">.</span><span class="nx">msg</span><span class="o">;</span>
            <span class="o">}</span>

            <span class="nx">console</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="nx">output</span><span class="o">,</span> <span class="nx">oEntry</span><span class="o">.</span><span class="nx">msg</span><span class="o">);</span>
        <span class="o">}</span>
    <span class="o">};</span>

    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// Private event handlers</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>
    <span class="c">/**</span>
<span class="c">     * Handles logging of messages due to window error events.</span>
<span class="c">     *</span>
<span class="c">     * @method _onWindowError</span>
<span class="c">     * @param sMsg {String} The error message.</span>
<span class="c">     * @param sUrl {String} URL of the error.</span>
<span class="c">     * @param sLine {String} Line number of the error.</span>
<span class="c">     * @private</span>
<span class="c">     */</span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_onWindowError</span> <span class="o">=</span> <span class="k">function</span><span class="o">(</span><span class="nx">sMsg</span><span class="o">,</span><span class="nx">sUrl</span><span class="o">,</span><span class="nx">sLine</span><span class="o">)</span> <span class="o">{</span>
        <span class="c">// Logger is not in scope of this event handler</span>
<span class="c"></span>        <span class="k">try</span> <span class="o">{</span>
            <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="nx">sMsg</span><span class="o">+</span><span class="s1">&#39; (&#39;</span><span class="o">+</span><span class="nx">sUrl</span><span class="o">+</span><span class="s1">&#39;, line &#39;</span><span class="o">+</span><span class="nx">sLine</span><span class="o">+</span><span class="s1">&#39;)&#39;</span><span class="o">,</span> <span class="s2">&quot;window&quot;</span><span class="o">);</span>
            <span class="k">if</span><span class="o">(</span><span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span><span class="o">)</span> <span class="o">{</span>
                <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">_origOnWindowError</span><span class="o">();</span>
            <span class="o">}</span>
        <span class="o">}</span>
        <span class="k">catch</span><span class="o">(</span><span class="nx">e</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">};</span>

    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">// First log</span>
<span class="c"></span>    <span class="c">//</span>
<span class="c"></span>    <span class="c">/////////////////////////////////////////////////////////////////////////////</span>
<span class="c"></span>
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">widget</span><span class="o">.</span><span class="nx">Logger</span><span class="o">.</span><span class="nx">log</span><span class="o">(</span><span class="s2">&quot;Logger initialized&quot;</span><span class="o">);</span>
<span class="o">}</span>
</pre></div>
                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div id="moduleList" class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li class=""><a href="module_animation.html" title="animation">animation</a></li>
                                <li class=""><a href="module_autocomplete.html" title="autocomplete">autocomplete</a></li>
                                <li class=""><a href="module_button.html" title="button">button</a></li>
                                <li class=""><a href="module_calendar.html" title="calendar">calendar</a></li>
                                <li class=""><a href="module_carousel.html" title="carousel">carousel</a></li>
                                <li class=""><a href="module_charts.html" title="charts">charts</a></li>
                                <li class=""><a href="module_colorpicker.html" title="colorpicker">colorpicker</a></li>
                                <li class=""><a href="module_connection.html" title="connection">connection</a></li>
                                <li class=""><a href="module_container.html" title="container">container</a></li>
                                <li class=""><a href="module_cookie.html" title="cookie">cookie</a></li>
                                <li class=""><a href="module_datasource.html" title="datasource">datasource</a></li>
                                <li class=""><a href="module_datatable.html" title="datatable">datatable</a></li>
                                <li class=""><a href="module_dom.html" title="dom">dom</a></li>
                                <li class=""><a href="module_dragdrop.html" title="dragdrop">dragdrop</a></li>
                                <li class=""><a href="module_editor.html" title="editor">editor</a></li>
                                <li class=""><a href="module_element.html" title="element">element</a></li>
                                <li class=""><a href="module_event.html" title="event">event</a></li>
                                <li class=""><a href="module_get.html" title="get">get</a></li>
                                <li class=""><a href="module_history.html" title="history">history</a></li>
                                <li class=""><a href="module_imagecropper.html" title="imagecropper">imagecropper</a></li>
                                <li class=""><a href="module_imageloader.html" title="imageloader">imageloader</a></li>
                                <li class=""><a href="module_json.html" title="json">json</a></li>
                                <li class=""><a href="module_layout.html" title="layout">layout</a></li>
                                <li class="selected"><a href="module_logger.html" title="logger">logger</a></li>
                                <li class=""><a href="module_menu.html" title="menu">menu</a></li>
                                <li class=""><a href="module_paginator.html" title="paginator">paginator</a></li>
                                <li class=""><a href="module_profiler.html" title="profiler">profiler</a></li>
                                <li class=""><a href="module_profilerviewer.html" title="profilerviewer">profilerviewer</a></li>
                                <li class=""><a href="module_resize.html" title="resize">resize</a></li>
                                <li class=""><a href="module_selector.html" title="selector">selector</a></li>
                                <li class=""><a href="module_slider.html" title="slider">slider</a></li>
                                <li class=""><a href="module_stylesheet.html" title="stylesheet">stylesheet</a></li>
                                <li class=""><a href="module_tabview.html" title="tabview">tabview</a></li>
                                <li class=""><a href="module_treeview.html" title="treeview">treeview</a></li>
                                <li class=""><a href="module_uploader.html" title="uploader">uploader</a></li>
                                <li class=""><a href="module_yahoo.html" title="yahoo">yahoo</a></li>
                                <li class=""><a href="module_yuiloader.html" title="yuiloader">yuiloader</a></li>
                                <li class=""><a href="module_yuitest.html" title="yuitest">yuitest</a></li>
                        </ul>
                    </div>

                    <div id="classList" class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li class=""><a href="LogMsg.html" title="LogMsg">LogMsg</a></li>
                                <li class=""><a href="LogReader.html" title="LogReader">LogReader</a></li>
                                <li class=""><a href="LogWriter.html" title="LogWriter">LogWriter</a></li>
                                <li class=""><a href="YAHOO.widget.Logger.html" title="YAHOO.widget.Logger">YAHOO.widget.Logger</a></li>
                        </ul>
                    </div>

                    <div id="fileList" class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li class="selected"><a href="Logger.js.html" title="Logger.js">Logger.js</a></li>
                                <li class=""><a href="LogMsg.js.html" title="LogMsg.js">LogMsg.js</a></li>
                                <li class=""><a href="LogReader.js.html" title="LogReader.js">LogReader.js</a></li>
                                <li class=""><a href="LogWriter.js.html" title="LogWriter.js">LogWriter.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2009 Yahoo! Inc. All rights reserved.
	</div>
</div>
<script type="text/javascript">
    ALL_YUI_PROPS = [{"access": "", "host": "LogReader", "name": "BASIC_TEMPLATE", "url": "LogReader.html#property_BASIC_TEMPLATE", "type": "property"}, {"access": "", "host": "LogReader", "name": "bottom", "url": "LogReader.html#property_bottom", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_browserConsoleEnabled", "url": "YAHOO.widget.Logger.html#property__browserConsoleEnabled", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_btnClear", "url": "LogReader.html#property__btnClear", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_btnCollapse", "url": "LogReader.html#property__btnCollapse", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_btnPause", "url": "LogReader.html#property__btnPause", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_buffer", "url": "LogReader.html#property__buffer", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "categories", "url": "YAHOO.widget.Logger.html#property_categories", "type": "property"}, {"access": "", "host": "LogMsg", "name": "category", "url": "LogMsg.html#property_category", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "categoryCreateEvent", "url": "YAHOO.widget.Logger.html#event_categoryCreateEvent", "type": "event"}, {"access": "private", "host": "LogReader", "name": "_categoryFilters", "url": "LogReader.html#property__categoryFilters", "type": "property"}, {"access": "", "host": "LogReader", "name": "clearConsole", "url": "LogReader.html#method_clearConsole", "type": "method"}, {"access": "", "host": "LogReader", "name": "collapse", "url": "LogReader.html#method_collapse", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_consoleMsgCount", "url": "LogReader.html#property__consoleMsgCount", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_createCategoryCheckbox", "url": "LogReader.html#method__createCategoryCheckbox", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_createNewCategory", "url": "YAHOO.widget.Logger.html#method__createNewCategory", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_createNewSource", "url": "YAHOO.widget.Logger.html#method__createNewSource", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_createSourceCheckbox", "url": "LogReader.html#method__createSourceCheckbox", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "disableBrowserConsole", "url": "YAHOO.widget.Logger.html#method_disableBrowserConsole", "type": "method"}, {"access": "", "host": "LogReader", "name": "draggable", "url": "LogReader.html#property_draggable", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elBtns", "url": "LogReader.html#property__elBtns", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elCategoryFilters", "url": "LogReader.html#property__elCategoryFilters", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elCollapse", "url": "LogReader.html#property__elCollapse", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elConsole", "url": "LogReader.html#property__elConsole", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elContainer", "url": "LogReader.html#property__elContainer", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elDefaultContainer", "url": "LogReader.html#property__elDefaultContainer", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elFt", "url": "LogReader.html#property__elFt", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elHd", "url": "LogReader.html#property__elHd", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_elSourceFilters", "url": "LogReader.html#property__elSourceFilters", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "enableBrowserConsole", "url": "YAHOO.widget.Logger.html#method_enableBrowserConsole", "type": "method"}, {"access": "", "host": "LogReader", "name": "entryFormat", "url": "LogReader.html#property_entryFormat", "type": "property"}, {"access": "", "host": "LogReader", "name": "ENTRY_TEMPLATE", "url": "LogReader.html#property_ENTRY_TEMPLATE", "type": "property"}, {"access": "", "host": "LogReader", "name": "expand", "url": "LogReader.html#method_expand", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_filterCheckboxes", "url": "LogReader.html#property__filterCheckboxes", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_filterLogs", "url": "LogReader.html#method__filterLogs", "type": "method"}, {"access": "", "host": "LogReader", "name": "fontSize", "url": "LogReader.html#property_fontSize", "type": "property"}, {"access": "", "host": "LogReader", "name": "footerEnabled", "url": "LogReader.html#property_footerEnabled", "type": "property"}, {"access": "", "host": "LogReader", "name": "getCategories", "url": "LogReader.html#method_getCategories", "type": "method"}, {"access": "", "host": "LogReader", "name": "getCheckbox", "url": "LogReader.html#method_getCheckbox", "type": "method"}, {"access": "", "host": "LogReader", "name": "getLastTime", "url": "LogReader.html#method_getLastTime", "type": "method"}, {"access": "", "host": "LogWriter", "name": "getSource", "url": "LogWriter.html#method_getSource", "type": "method"}, {"access": "", "host": "LogReader", "name": "getSources", "url": "LogReader.html#method_getSources", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "getStack", "url": "YAHOO.widget.Logger.html#method_getStack", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "getStartTime", "url": "YAHOO.widget.Logger.html#method_getStartTime", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "handleWindowErrors", "url": "YAHOO.widget.Logger.html#method_handleWindowErrors", "type": "method"}, {"access": "", "host": "LogReader", "name": "height", "url": "LogReader.html#property_height", "type": "property"}, {"access": "", "host": "LogReader", "name": "hide", "url": "LogReader.html#method_hide", "type": "method"}, {"access": "", "host": "LogReader", "name": "hideCategory", "url": "LogReader.html#method_hideCategory", "type": "method"}, {"access": "", "host": "LogReader", "name": "hideSource", "url": "LogReader.html#method_hideSource", "type": "method"}, {"access": "private", "host": "LogReader", "name": "html2Text", "url": "LogReader.html#method_html2Text", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initCategories", "url": "LogReader.html#method__initCategories", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initConsoleEl", "url": "LogReader.html#method__initConsoleEl", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initContainerEl", "url": "LogReader.html#method__initContainerEl", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initDragDrop", "url": "LogReader.html#method__initDragDrop", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initFooterEl", "url": "LogReader.html#method__initFooterEl", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initHeaderEl", "url": "LogReader.html#method__initHeaderEl", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_initSources", "url": "LogReader.html#method__initSources", "type": "method"}, {"access": "", "host": "LogReader", "name": "isCollapsed", "url": "LogReader.html#property_isCollapsed", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_isNewCategory", "url": "YAHOO.widget.Logger.html#method__isNewCategory", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_isNewSource", "url": "YAHOO.widget.Logger.html#method__isNewSource", "type": "method"}, {"access": "", "host": "LogReader", "name": "isPaused", "url": "LogReader.html#property_isPaused", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_lastTime", "url": "LogReader.html#property__lastTime", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_lastTime", "url": "YAHOO.widget.Logger.html#property__lastTime", "type": "property"}, {"access": "", "host": "LogReader", "name": "left", "url": "LogReader.html#property_left", "type": "property"}, {"access": "", "host": "LogWriter", "name": "log", "url": "LogWriter.html#method_log", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "log", "url": "YAHOO.widget.Logger.html#method_log", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "loggerEnabled", "url": "YAHOO.widget.Logger.html#property_loggerEnabled", "type": "property"}, {"access": "", "host": "LogReader", "name": "logReaderEnabled", "url": "LogReader.html#property_logReaderEnabled", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "logResetEvent", "url": "YAHOO.widget.Logger.html#event_logResetEvent", "type": "event"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "maxStackEntries", "url": "YAHOO.widget.Logger.html#property_maxStackEntries", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_memberName", "url": "LogReader.html#property__memberName", "type": "property"}, {"access": "", "host": "LogMsg", "name": "msg", "url": "LogMsg.html#property_msg", "type": "property"}, {"access": "", "host": "LogReader", "name": "newestOnTop", "url": "LogReader.html#property_newestOnTop", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "newLogEvent", "url": "YAHOO.widget.Logger.html#event_newLogEvent", "type": "event"}, {"access": "private", "host": "LogReader", "name": "_onCategoryCreate", "url": "LogReader.html#method__onCategoryCreate", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onCheckCategory", "url": "LogReader.html#method__onCheckCategory", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onCheckSource", "url": "LogReader.html#method__onCheckSource", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onClickClearBtn", "url": "LogReader.html#method__onClickClearBtn", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onClickCollapseBtn", "url": "LogReader.html#method__onClickCollapseBtn", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onClickPauseBtn", "url": "LogReader.html#method__onClickPauseBtn", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onNewLog", "url": "LogReader.html#method__onNewLog", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onReset", "url": "LogReader.html#method__onReset", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_onSourceCreate", "url": "LogReader.html#method__onSourceCreate", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_onWindowError", "url": "YAHOO.widget.Logger.html#method__onWindowError", "type": "method"}, {"access": "", "host": "LogReader", "name": "outputBuffer", "url": "LogReader.html#property_outputBuffer", "type": "property"}, {"access": "", "host": "LogReader", "name": "pause", "url": "LogReader.html#method_pause", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_printBuffer", "url": "LogReader.html#method__printBuffer", "type": "method"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_printToBrowserConsole", "url": "YAHOO.widget.Logger.html#method__printToBrowserConsole", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_printToConsole", "url": "LogReader.html#method__printToConsole", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "reset", "url": "YAHOO.widget.Logger.html#method_reset", "type": "method"}, {"access": "", "host": "LogReader", "name": "resume", "url": "LogReader.html#method_resume", "type": "method"}, {"access": "", "host": "LogReader", "name": "right", "url": "LogReader.html#property_right", "type": "property"}, {"access": "", "host": "LogWriter", "name": "setSource", "url": "LogWriter.html#method_setSource", "type": "method"}, {"access": "", "host": "LogReader", "name": "setTitle", "url": "LogReader.html#method_setTitle", "type": "method"}, {"access": "", "host": "LogReader", "name": "show", "url": "LogReader.html#method_show", "type": "method"}, {"access": "", "host": "LogReader", "name": "showCategory", "url": "LogReader.html#method_showCategory", "type": "method"}, {"access": "", "host": "LogReader", "name": "showSource", "url": "LogReader.html#method_showSource", "type": "method"}, {"access": "private", "host": "LogReader", "name": "_sName", "url": "LogReader.html#property__sName", "type": "property"}, {"access": "", "host": "LogMsg", "name": "source", "url": "LogMsg.html#property_source", "type": "property"}, {"access": "private", "host": "LogWriter", "name": "_source", "url": "LogWriter.html#property__source", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "sourceCreateEvent", "url": "YAHOO.widget.Logger.html#event_sourceCreateEvent", "type": "event"}, {"access": "", "host": "LogMsg", "name": "sourceDetail", "url": "LogMsg.html#property_sourceDetail", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_sourceFilters", "url": "LogReader.html#property__sourceFilters", "type": "property"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "sources", "url": "YAHOO.widget.Logger.html#property_sources", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_stack", "url": "YAHOO.widget.Logger.html#property__stack", "type": "property"}, {"access": "private", "host": "YAHOO.widget.Logger", "name": "_startTime", "url": "YAHOO.widget.Logger.html#property__startTime", "type": "property"}, {"access": "", "host": "LogReader", "name": "thresholdMax", "url": "LogReader.html#property_thresholdMax", "type": "property"}, {"access": "", "host": "LogReader", "name": "thresholdMin", "url": "LogReader.html#property_thresholdMin", "type": "property"}, {"access": "", "host": "LogMsg", "name": "time", "url": "LogMsg.html#property_time", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_timeout", "url": "LogReader.html#property__timeout", "type": "property"}, {"access": "private", "host": "LogReader", "name": "_title", "url": "LogReader.html#property__title", "type": "property"}, {"access": "", "host": "LogReader", "name": "top", "url": "LogReader.html#property_top", "type": "property"}, {"access": "", "host": "LogWriter", "name": "toString", "url": "LogWriter.html#method_toString", "type": "method"}, {"access": "", "host": "LogReader", "name": "toString", "url": "LogReader.html#method_toString", "type": "method"}, {"access": "", "host": "YAHOO.widget.Logger", "name": "unhandleWindowErrors", "url": "YAHOO.widget.Logger.html#method_unhandleWindowErrors", "type": "method"}, {"access": "", "host": "LogReader", "name": "verboseOutput", "url": "LogReader.html#property_verboseOutput", "type": "property"}, {"access": "", "host": "LogReader", "name": "VERBOSE_TEMPLATE", "url": "LogReader.html#property_VERBOSE_TEMPLATE", "type": "property"}, {"access": "", "host": "LogReader", "name": "width", "url": "LogReader.html#property_width", "type": "property"}];
</script>
</body>
</html>
